package fm.yichenet.mongo.service;

import com.mongodb.DBObject;
import fm.entity.ArticleComment;
import fm.dto.NeiyiUser;
import fm.entityEnum.ArticleAdEnum;
import fm.exception.BizException;
import fm.yichenet.dto.ArticleDto;

import java.util.List;
import java.util.Map;

/**
 * Created by 宏炜 on 2017-05-26.
 */
public interface ArticleService {

    DBObject mergeArticle(ArticleDto articleDto) throws Exception;

    void addFlag(String id, ArticleAdEnum flag, String startTime, String endTime) throws Exception;

    void removeFlag(String id, ArticleAdEnum flag) throws Exception;

    List getArticleForPage(Map params, Integer pageSize, Integer pageNum) throws Exception;

    long countArticles(Map params) throws Exception;

    DBObject commentArticle(ArticleComment articleComment) throws Exception;

    List getCommentsList(Integer pageSize, Integer pageNum, String article_id, Integer type) throws Exception;

    long countComments(String article_id, Integer type) throws Exception;

    DBObject getArticleInfo(String article_id) throws Exception;

    void deleteArticle(String article_id) throws Exception;


    void updateArticle(String articleId, DBObject article);


    long countInfoArticle(Map param);

    List<DBObject> getInfoArticleList(DBObject query) throws Exception;

    List<DBObject> getInfoArticleListByparam(Map params) throws Exception;

    void addInfoArticle(DBObject info) throws Exception;

    void deleteInfoArticle(DBObject query);

    void deleteUserArticle(NeiyiUser user, String articleId);
    void articleCollect(String article_id,boolean flag) throws Exception;
    void commentLike(String id) throws Exception;
}
